import 'package:flutter/material.dart';

/// 不随系统字体大小发生变化
class NoScaleTextWidget extends StatelessWidget {
  final Widget child;

  NoScaleTextWidget({
    Key key,
    @required this.child,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    var data = MediaQuery.of(context);
    return MediaQuery(
      data: data.copyWith(textScaleFactor: 1.0),
      child: child,
    );
  }
}
